import { createStore } from 'vuex'

export default createStore({
  state: {
    ids:[1001,1002,1003],
    fileNavArray:['应用/']
  },
  mutations: {
    setFileNav(state,val){
      state.fileNavArray.push(val)
    },
  },
  actions: {
    handleFileNav({commit,state},val){
      if(state.ids.includes(val.id)){
        state.fileNavArray.length = 0
      }
      let key = val.name+'/'
      commit('setFileNav',key)
    }
  },
  modules: {}
})
